home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / minix / up1510b.tgz / up1510b / src / kernel / stprint.c.D < prev    next >
Text File  |  1990-07-25  |  5KB  |  193 lines

  1. *** /tmp/,RCSt1022338    Wed Jul 25 13:56:10 1990
  2. --- stprint.c    Mon Jul 23 22:35:31 1990
  3. ***************
  4. *** 1,2 ****
  5. ! #ifdef ATARI_ST
  6.   /* This file contains the printer driver for the Atari ST.
  7. --- 1,2 ----
  8. ! #if (CHIP == M68000)
  9.   /* This file contains the printer driver for the Atari ST.
  10. ***************
  11. *** 8,10 ****
  12.    *
  13. !  *   TTY_O_DONE:   output completed
  14.    *   TTY_WRITE:    a process wants to write on a terminal
  15. --- 8,10 ----
  16.    *
  17. !  *   HARD_INT:     output completed
  18.    *   TTY_WRITE:    a process wants to write on a terminal
  19. ***************
  20. *** 14,16 ****
  21.    * -------------------------------------------------------
  22. !  * | TTY_O_DONE  |minor dev|         |         |         |
  23.    * |-------------+---------+---------+---------+---------|
  24. --- 14,16 ----
  25.    * -------------------------------------------------------
  26. !  * | HARD_INT    |minor dev|         |         |         |
  27.    * |-------------+---------+---------+---------+---------|
  28. ***************
  29. *** 26,35 ****
  30.   
  31. ! #include "../h/const.h"
  32. ! #include "../h/type.h"
  33. ! #include "../h/callnr.h"
  34. ! #include "../h/com.h"
  35. ! #include "../h/error.h"
  36. ! #include "const.h"
  37. ! #include "type.h"
  38. ! #include "glo.h"
  39.   #include "proc.h"
  40. --- 26,30 ----
  41.   
  42. ! #include "kernel.h"
  43. ! #include <minix/callnr.h>
  44. ! #include <minix/com.h>
  45.   #include "proc.h"
  46. ***************
  47. *** 40,41 ****
  48. --- 35,43 ----
  49.   
  50. + static void do_write();
  51. + static void do_done();
  52. + static void do_cancel();
  53. + static void reply();
  54. + static void outc();
  55. + void piaint();
  56.   #define CANCELED        -999    /* indicates that command has been killed */
  57. ***************
  58. *** 52,54 ****
  59.    *===========================================================================*/
  60. ! PUBLIC printer_task()
  61.   {
  62. --- 54,56 ----
  63.    *===========================================================================*/
  64. ! PUBLIC void printer_task()
  65.   {
  66. ***************
  67. *** 61,63 ****
  68.           case CANCEL   :    do_cancel(&m);    break;
  69. !         case TTY_O_DONE:    do_done(&m);    break;
  70.               default:                break;
  71. --- 63,65 ----
  72.           case CANCEL   :    do_cancel(&m);    break;
  73. !         case HARD_INT :    do_done(&m);    break;
  74.               default:                break;
  75. ***************
  76. *** 71,73 ****
  77.    *===========================================================================*/
  78. ! PRIVATE do_write(mp)
  79.   register message *mp;
  80. --- 73,75 ----
  81.    *===========================================================================*/
  82. ! PRIVATE void do_write(mp)
  83.   register message *mp;
  84. ***************
  85. *** 76,78 ****
  86.     register struct proc *rp;
  87. -   extern phys_bytes umap();
  88.   
  89. --- 78,79 ----
  90. ***************
  91. *** 115,117 ****
  92.    *===========================================================================*/
  93. ! PRIVATE do_done(mp)
  94.   message *mp;
  95. --- 116,118 ----
  96.    *===========================================================================*/
  97. ! PRIVATE void do_done(mp)
  98.   message *mp;
  99. ***************
  100. *** 125,127 ****
  101. --- 126,131 ----
  102.       return;
  103. + #if 0
  104.     status = (mp->REP_STATUS == OK ? orig : EIO);
  105. + #endif
  106. +   status = orig;
  107.     reply(REVIVE, caller, procno, status);
  108. ***************
  109. *** 135,137 ****
  110.    *===========================================================================*/
  111. ! PRIVATE do_cancel(mp)
  112.   message *mp;            /* pointer to the newly arrived message */
  113. --- 139,141 ----
  114.    *===========================================================================*/
  115. ! PRIVATE void do_cancel(mp)
  116.   message *mp;            /* pointer to the newly arrived message */
  117. ***************
  118. *** 146,149 ****
  119.     left = 0;            /* causes printing to stop at next interrupt*/
  120. -   procno = CANCELED;        /* marks process as canceled */
  121.     reply(TASK_REPLY, mp->m_source, mp->PROC_NR, EINTR);
  122.   }
  123. --- 150,153 ----
  124.     left = 0;            /* causes printing to stop at next interrupt*/
  125.     reply(TASK_REPLY, mp->m_source, mp->PROC_NR, EINTR);
  126. +   procno = CANCELED;        /* marks process as canceled */
  127.   }
  128. ***************
  129. *** 154,156 ****
  130.    *===========================================================================*/
  131. ! PRIVATE reply(code, replyee, process, status)
  132.   int code;            /* TASK_REPLY or REVIVE */
  133. --- 158,160 ----
  134.    *===========================================================================*/
  135. ! PRIVATE void reply(code, replyee, process, status)
  136.   int code;            /* TASK_REPLY or REVIVE */
  137. ***************
  138. *** 175,177 ****
  139.    *===========================================================================*/
  140. ! PUBLIC piaint()
  141.   {
  142. --- 179,181 ----
  143.    *===========================================================================*/
  144. ! PUBLIC void piaint()
  145.   {
  146. ***************
  147. *** 181,184 ****
  148.    */
  149. -   static message m;
  150.     if (busy == FALSE) {
  151. --- 185,186 ----
  152. ***************
  153. *** 197,202 ****
  154.     }
  155. !   
  156. !   m.m_type = TTY_O_DONE;
  157. !   m.REP_STATUS = OK;
  158. !   interrupt(PRINTER, &m);
  159.   }
  160. --- 199,201 ----
  161.     }
  162. !   interrupt(PRINTER);
  163.   }
  164. ***************
  165. *** 204,206 ****
  166.   
  167. ! PRIVATE outc(c)
  168.   {
  169. --- 203,206 ----
  170.   
  171. ! PRIVATE void outc(c)
  172. ! int c;
  173.   {
  174. ***************
  175. *** 230,232 ****
  176.   #ifdef DEBOUT
  177. ! PUBLIC prtc(c)
  178.   {
  179. --- 230,233 ----
  180.   #ifdef DEBOUT
  181. ! PUBLIC void prtc(c)
  182. ! int c;
  183.   {
  184. ***************
  185. *** 249,250 ****
  186.   #endif
  187. ! #endif ATARI_ST
  188. --- 250,251 ----
  189.   #endif
  190. ! #endif
  191.